﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Cms_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected override void OnInit(EventArgs e)
    {

        if (Server.UrlEncode(Request.QueryString["tab"]) != null)
        {
            string controller = Server.UrlEncode(Request.QueryString["tab"]);
            switch (controller.ToLower())
            {
                default:
                    PlaceHolder1.Controls.Add(LoadControl(@"Home.ascx"));
                    break;
                
            
                case "lienhe":
                    PlaceHolder1.Controls.Add(LoadControl(@"Contact.ascx"));
                    break;
                case "diennuoc":
                    PlaceHolder1.Controls.Add(LoadControl(@"PhiDienNuoc.ascx"));
                    break;
                case "gioithieu":
                    PlaceHolder1.Controls.Add(LoadControl(@"GioiThieu.ascx"));
                    break;
                case "tintuc":
                    PlaceHolder1.Controls.Add(LoadControl(@"ListTinTuc.ascx"));
                    break;
                case "cttintuc":
                    PlaceHolder1.Controls.Add(LoadControl(@"CTTinTuc.ascx"));
                    break;
                case "thongbao":
                    PlaceHolder1.Controls.Add(LoadControl(@"ListThongBao.ascx"));
                    break;
                case "ctthongbao":
                    PlaceHolder1.Controls.Add(LoadControl(@"CTThongBao.ascx"));
                    break;
                case "dangnhap":
                    PlaceHolder1.Controls.Add(LoadControl(@"Login.ascx"));
                    break;
                case "ttsinhvien":
                    PlaceHolder1.Controls.Add(LoadControl(@"ThongTinSinhVien.ascx"));
                    break;
            }
        }
        else
        {
            PlaceHolder1.Controls.Add(LoadControl(@"Home.ascx"));
        }
        base.OnInit(e);
    }
}